/*
* Copyright 2010 Pavel Kozhin 
*
* Licensed under the Apache License, Version 2.0 (the "License"); 
* you may not use this file except in compliance with the License. 
* You may obtain a copy of the License at 
* 
* http://www.apache.org/licenses/LICENSE-2.0
* 
* Unless required by applicable law or agreed to in writing, software 
* distributed  under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
* See the License for the specific language governing permissions and 
* limitations under the License.
*
* Author: Pavel Kozhin.
*/

package org.bookmarksframework.core
{
	import flash.events.IEventDispatcher;
	
	import mx.collections.ArrayList;
	import mx.collections.IList;
	import mx.core.IFactory;
	import mx.core.IFlexDisplayObject;
	
	import org.bookmarksframework.rule.IRuleParser;

	public interface IFragment extends IEventDispatcher
	{
		function get uid():String;
		
		function set uid(value:String):void;
		
		function get id():String;
		
		function set id(value:String):void;
		
		[Bindable("propertyChange")]
		function get parent():IFragment;
		
		function set parent(value:IFragment):void;
		
		[Bindable("fragmentHostChanged")]
		function get host():IFlexDisplayObject;
		
		[Bindable("fragmentPathChanged")]
		function get path():Path;
		
		[Bindable("fragmentPartChanged")]
		function get part():*;
		
		function set part(value:*):void;
		
		function get substitution():*;
		
		function set substitution(value:*):void;
		
		function get active():Boolean;
		
		function set active(value:Boolean):void;
		
		function get registered():Boolean;
		
		function set registered(value:Boolean):void;
		
		function get enabled():Boolean;
		
		function set enabled(value:Boolean):void;
		
		function get rule():Object;
		
		function set rule(value:Object):void;
		
		function get ruleParserFactory():IFactory;
		
		function set ruleParserFactory(value:IFactory):void;
		
		function get ruleParser():IRuleParser;
		
		[Bindable("propertyChange")]
		function get targetField():String;
		
		function set targetField(value:String):void;
		
		[Bindable("propertyChange")]
		function get target():Object;
		
		function set target(value:Object):void;
		
		[Bindable("propertyChange")]
		function get value():*;
		
		function set value(value:*):void;
		
		[Bindable("propertyChange")]
		function get isChildActiveFunction():Function;
		
		function set isChildActiveFunction(value:Function):void;
		
		[Bindable("propertyChange")]
		function get pending():Boolean;
		
		function set pending(value:Boolean):void;
		
		function get relations():IList;
		
		function get blockable():IList;
		
		function initialize(host:IFlexDisplayObject):void;
		
		function commit(path:*):void;
		
		function destroy():void;
	}
}